<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>更新人员信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
        }
        form {
            max-width: 400px;
            margin: 0 auto;
        }
        label, input, select {
            display: block;
            margin-bottom: 10px;
            width: 100%;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            padding: 10px;
            border: none;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <h1>更新人员信息</h1>
    <form action="update.do" method="post">
        <input type="hidden" name="flag" value="update">

        <label for="id">ID:</label>
        <input type="hidden" id="id" name="id" th:value="${user.id}">

        <label for="username">用户名称:</label>
        <input type="text" id="username" name="username" th:value="${user.username}">

        <label for="sex">性别:</label>
        <select id="sex" name="sex" required>
            <option th:selected="${user.sex eq 'boy'}" value="boy">boy</option>
            <option th:selected="${user.sex eq 'girl'}" value="girl">girl</option>
        </select>

        <label for="pwd">密码:</label>
        <input type="password" id="pwd" name="pwd" th:value="${user.pwd}">

        <input type="submit" value="更新">
    </form>
    <br>
    <a href="show.html">返回列表</a>
</body>
</html>